/PROG  PNS0068
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "53424343-PHEV";
PROG_SIZE	= 3409;
CREATE		= DATE 18-07-11  TIME 12:23:46;
MODIFIED	= DATE 20-02-18  TIME 16:09:34;
FILE_NAME	= PNS0020;
VERSION		= 0;
LINE_COUNT	= 120;
MEMORY_SIZE	= 3865;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R23 ;
   6:  !  PROGRAM: PNS0068 ;
   7:  !  PART:53424343 ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.15    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  R[5:SPEED           ]=10    ;
  24:  OVERRIDE=R[5:SPEED           ] ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC110    ;
  28:   ;
  29:  R[1:CYCLE TOTAL]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:   ;
  33:  LBL[10:TOP OF LOOF] ;
  34:  OVERRIDE=R[5:SPEED           ] ;
  35:   ;
  36:  TIMER[3]=STOP ;
  37:  TIMER[2]=STOP ;
  38:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  39:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  40:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  41:  R[8:R MOVE TIME]=TIMER[3]    ;
  42:  TIMER[2]=RESET ;
  43:  TIMER[2]=START ;
  44:  TIMER[3]=RESET ;
  45:   ;
  46:  !PROCEED TO PICK ;
  47:  LBL[20] ;
  48:  IF DI[1:P3 PICK ENTRY OK]=ON AND DI[3:FROM R23 CLEAR]=ON AND DI[8:P3 PICK START]=ON,JMP LBL[25] ;
  49:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  50:  JMP LBL[20] ;
  51:   ;
  52:  LBL[25] ;
  53:  TIMER[3]=START ;
  54:  R[5:SPEED           ]=100    ;
  55:  OVERRIDE=R[5:SPEED           ] ;
  56:J P[3:PICK APPROACH] 100% CNT50 ACC110    ;
  57:   ;
  58:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100    ;
  59:  PAYLOAD[2] ;
  60:  CALL CHK_PICK    ;
  61:  MONITOR Z_CHECH ;
  62:J P[5:PICK DEPART] 100% CNT25 ACC110 TA R[20]sec,DO[5:TO R23 DROP START]=PULSE,1.0sec    ;
  63:  DO[8:P3 PARTS OUT]=PULSE,1.0sec ;
  64:  LBL[27] ;
  65:  CALL CHECKPICK    ;
  66:  IF DI[9:VACUUM ON L]=OFF OR DI[11:VACUUM ON R]=OFF,JMP LBL[27] ;
  67:   ;
  68:J P[6:PICK SNEAK] 100% CNT100 ACC110    ;
  69:J P[7:PICK CLEAR] 100% CNT100 ACC110    ;
  70:   ;
  71:  LBL[30:GOTO DROP POUNCE] ;
  72:J P[8:DROP POUNCE] 100% CNT100 ACC110    ;
  73:   ;
  74:  TIMER[3]=STOP ;
  75:  LBL[40:AT DROP POUNCE] ;
  76:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  77:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P4 DROP ENTRY]=ON,JMP LBL[50] ;
  78:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  79:  JMP LBL[40] ;
  80:   ;
  81:  LBL[50:MOVE DROP SNEAK] ;
  82:  TIMER[3]=START ;
  83:  OVERRIDE=R[5:SPEED           ] ;
  84:J P[9:DROP SNEAK] 100% CNT60 ACC110    ;
  85:  LBL[51:DROP OR C-P-S] ;
  86:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  87:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  88:  JMP LBL[51] ;
  89:  JMP LBL[50] ;
  90:   ;
  91:  LBL[60:MOVE CLS-PRS-ACC] ;
  92:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  93:  PAUSE ;
  94:  JMP LBL[30] ;
  95:   ;
  96:  LBL[80:DROP ENABLED] ;
  97:  TIMER[3]=START ;
  98:  !PROCEED TO DROP ;
  99:  OVERRIDE=R[5:SPEED           ] ;
 100:J P[10:DROP APPROACH] 100% CNT40 ACC130    ;
 101:  MONITOR END Z_CHECH ;
 102:J P[11:DROP] 100% CNT10 TB R[19]sec,CALL PARTDROP ACC110    ;
 103:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 104:  PAYLOAD[1] ;
 105:  CALL CHK_DROP    ;
 106:   ;
 107:J P[12:DROP DEPART] 100% CNT25 ACC150 DB    5.0mm,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 108:J P[13:DROP CLEAR] 100% CNT100 ACC150    ;
 109:  !GOTO PICK POUNCE ;
 110:J P[2:PICK POUNCE] 100% CNT100 ACC110 BREAK    ;
 111:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 112:  JMP LBL[10] ;
 113:   ;
 114:  LBL[90:END OF CYCLE] ;
 115:  TIMER[1]=STOP ;
 116:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 117:J P[1:MIDDLE] 50% CNT100    ;
 118:  MOVE TO HOME    ;
 119:   ;
 120:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z =  -780.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2200.379  mm,	Y =  1576.000  mm,	Z = -1050.000  mm,
	W =   179.712 deg,	P =     -.102 deg,	R =   141.615 deg,
	E1=   144.620 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2627.330  mm,	Y =  3214.333  mm,	Z = -1044.687  mm,
	W =   179.734 deg,	P =     -.674 deg,	R =    90.642 deg,
	E1=   193.612 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2627.344  mm,	Y =  3214.280  mm,	Z = -1212.916  mm,
	W =   179.737 deg,	P =     -.671 deg,	R =    90.641 deg,
	E1=   193.609 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2627.301  mm,	Y =  3214.266  mm,	Z =  -888.523  mm,
	W =   179.734 deg,	P =     -.673 deg,	R =    90.645 deg,
	E1=   193.609 deg
};
P[6:"PICK SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2297.024  mm,	Y =  1995.126  mm,	Z =  -923.875  mm,
	W =   179.685 deg,	P =     -.187 deg,	R =   133.559 deg,
	E1=   152.366 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2173.033  mm,	Y =  1523.128  mm,	Z =  -922.831  mm,
	W =   179.736 deg,	P =     -.064 deg,	R =   145.865 deg,
	E1=   140.534 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2196.368  mm,	Y = -1000.059  mm,	Z =  -883.001  mm,
	W =  -179.816 deg,	P =      .014 deg,	R =  -160.461 deg,
	E1=    87.305 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2135.063  mm,	Y = -1312.971  mm,	Z =  -871.201  mm,
	W =  -179.815 deg,	P =      .015 deg,	R =  -160.776 deg,
	E1=    83.926 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2651.642  mm,	Y = -3181.913  mm,	Z =  -990.101  mm,
	W =  -178.359 deg,	P =    -7.058 deg,	R =   -92.662 deg,
	E1=    17.246 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2648.606  mm,	Y = -3182.543  mm,	Z = -1207.140  mm,
	W =  -178.359 deg,	P =    -7.058 deg,	R =   -93.017 deg,
	E1=    17.246 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2651.642  mm,	Y = -3181.912  mm,	Z = -1054.101  mm,
	W =  -178.359 deg,	P =    -7.058 deg,	R =   -92.662 deg,
	E1=    17.246 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2206.921  mm,	Y = -1696.849  mm,	Z = -1050.000  mm,
	W =  -178.690 deg,	P =     -.702 deg,	R =  -141.443 deg,
	E1=    67.905 deg
};
/END
